package com.employee.service.impl;

import com.employee.mapper.ScheduleMapper;
import com.employee.pojo.dto.AddScheduleDTO;
import com.employee.pojo.dto.UpdateScheduleDTO;
import com.employee.pojo.entry.Schedule;
import com.employee.service.ScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ScheduleServiceImpl implements ScheduleService {
    @Autowired
    ScheduleMapper scheduleMapper;


    @Override
    public List<Schedule> getScheduleList() {
        return scheduleMapper.getScheduleList();
    }

    @Override
    public void addSchedule(AddScheduleDTO addScheduleDTO) {
     scheduleMapper.addSchedule(addScheduleDTO);
    }

    @Override
    public void deleteSchedule(Integer id) {
        scheduleMapper.deleteSchedule(id);
    }

    @Override
    public void updateSchedule(UpdateScheduleDTO updateScheduleDTO) {
        scheduleMapper.updateSchedule(updateScheduleDTO);
    }
}
